package com.neusoft.ruangong.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.sql.Time;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Reservations {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long roomId;
    private String user;
    private String mobile;
//    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date date;
    @Resource
    private Time begintime;
    @Resource
    private Time endtime;
    private String mark;
    private String email;
    private String code;
    private String name;
    public Reservations(Long room_id, String user) {
        this.roomId = room_id;
        this.user = user;
    }
}
